﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Themes/Default/Views/Shared/Member.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Fashion.Models.Order>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	ViewOrder
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>ViewOrder</h2>

    <table>
        <tr>
            <th></th>
            <th>
                OrderID
            </th>
            <th>
                Total Price
            </th>
            <th> 
                Order Date
            </th>
            <th>
                Ship Date
            </th>
            <th>
                Status
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Details", "OrderDetail", new { orderID=item.OrderID })%> |
                <%: Html.ActionLink("Cancel", "CancelOrder", new { orderID=item.OrderID })%>
            </td>
            <td>
                <%: item.OrderID %>
            </td>
            <td>
                <%: String.Format("{0:F}", item.TotalPrice) %>
            </td>
            <td>
                <%: String.Format("{0:dd/MM/yyyy}", item.OrderDate)%>
            </td>
            <td>
                <%: String.Format("{0:dd/MM/yyyy}", item.ShipDate)%>
            </td>
            <td>
                <%: item.CurrentStatus %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Back to Dashboard", "Index") %>
    </p>

</asp:Content>

